Create recurring test job
Creates a recurring test job template that automatically triggers executions based on the specified recurrence rules.
Headers
| Header | Value |
|---|---|
user_id | Login username (email) |
api_key | API key of the user for authentication |
Content-Type | application/json |
Accept | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accelqLoginUrl | string | Yes | The AccelQ login URL for API access. |
tenantCode | string | Yes | Tenant code for identifying the organization. |
projectCode | string | Yes | Project Code found under Auth properties of ACCELQ User Profile |
user_id | string | Yes | Login username (email) |
api_key | string | Yes | API key of the user for authentication |
Request Body
json
{
"recurrenceInfo": {
"DTSTART": "2024-04-21T10:30",
"RRULE": "FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,TH,SA;COUNT=6",
"timeZone": "+05:30"
},
"runEntityType": "SCENARIO",
"scnPid": 15,
"purpose": "ACME INC ticket booking.",
"appEnvironmentName": "Staging",
"appVariantOptionName": "Default",
"screenshotMode": "OPTIMAL",
"loggerLevel": "STANDARD",
"runProperties": {
"todayPrice": "2000",
"totalTest": "5"
},
"executionParameters": {
"retryCount": "2",
"platform": "windows"
},
"timeOuts": {
"pageLoadWaitTime": 50,
"elementWaitTime": 40,
"apiTimeout": 60
},
"agentInfo": {
"agentSelectionType": "BY_AVAILABILITY",
"agentByAvailabilityInfo": {
"namePattern": "Prod_*",
"agentCountForJobDistribution": 3
},
"numOfParallelRuns": 2,
"browserExecution": {
"browser": {
"name": "EDGE",
"version": "12.54"
},
"targetDeviceType": "DESKTOP",
"desktopDevice": {
"os": "MacOS",
"osVersion": "11",
"emulatedDeviceName": "Android Phone 393 x 851"
},
"browserKeepAlive": true,
"enableWebAccessibilityTesting": true,
"enableWebPerformanceTesting": true,
"webPerformanceSlaThreshold": 10,
"webDriverProfileName": "Web Driver Profile 1"
}
},
"enableSelfHealing": true,
"notifications": {
"notifyOnStart": true,
"notifyOnCompletion": true,
"notificationMode": "ON_ERROR",
"notificationEmails": [
"demo1@acmeInc.com",
"demo2@acmeInc.com"
],
"notificationChannels": {
"slackChannels": [
"Slack-channel-1"
],
"teamsChannels": [
"QA-Team",
"PKN-team"
]
}
},
"autoRerun": {
"failurePercentageLimit": 10,
"maxRerunAttempts": 5,
"delayBetweenReruns": 3,
"rerunOnNoImprovement": false
},
"setup": {
"testCaseSetup": {
"actionPid": 14,
"actionInputParams": [
{
"name": "configPath",
"valueType": "LITERAL",
"value": "/configs/settings.json"
},
{
"name": "maxRetries",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 2"
}
]
},
"testJobSetup": {
"actionPid": 19,
"actionInputParams": [
{
"name": "retryCount",
"value": "3"
}
]
}
},
"teardown": {
"testCaseTeardown": {
"actionPid": 13,
"actionInputParams": [
{
"name": "filePath",
"valueType": "LITERAL",
"value": "/users/data.csv"
},
{
"name": "transactionLimit",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 1"
}
]
},
"testJobTeardown": {
"actionPid": 18,
"actionInputParams": [
{
"name": "userAge",
"value": "21"
}
]
}
}
}
Responses
200 - Job creation successfull.
json
{
"jobPid": 42,
"message": "Recurring Test Job created successfully."
}
400 - Bad Request Error
json
{
"error": "Provided timeZone is not accepted UTC offset. Accepted format is (+/-)HH:mm"
}
401 - Unauthorized - User does not have authorization
json
{
"error": "User does not exist."
}
404 - Not Found Error
json
{
"error": "Scenario with Pid 15 does not exists in the project."
}
cURL Command Builder
URL Parameters
Headers
Request Sample (cURL)
curl -X POST "${{accelqLoginUrl}}/awb/api/2.0/${{tenantCode}}/${{projectCode}}/test-exec/jobs/recurring" \
-H "user_id: ${{user_id}}" \
-H "api_key: ${{api_key}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"recurrenceInfo": {
"DTSTART": "2024-04-21T10:30",
"RRULE": "FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,TH,SA;COUNT=6",
"timeZone": "+05:30"
},
"runEntityType": "SCENARIO",
"scnPid": 15,
"purpose": "ACME INC ticket booking.",
"appEnvironmentName": "Staging",
"appVariantOptionName": "Default",
"screenshotMode": "OPTIMAL",
"loggerLevel": "STANDARD",
"runProperties": {
"todayPrice": "2000",
"totalTest": "5"
},
"executionParameters": {
"retryCount": "2",
"platform": "windows"
},
"timeOuts": {
"pageLoadWaitTime": 50,
"elementWaitTime": 40,
"apiTimeout": 60
},
"agentInfo": {
"agentSelectionType": "BY_AVAILABILITY",
"agentByAvailabilityInfo": {
"namePattern": "Prod_*",
"agentCountForJobDistribution": 3
},
"numOfParallelRuns": 2,
"browserExecution": {
"browser": {
"name": "EDGE",
"version": "12.54"
},
"targetDeviceType": "DESKTOP",
"desktopDevice": {
"os": "MacOS",
"osVersion": "11",
"emulatedDeviceName": "Android Phone 393 x 851"
},
"browserKeepAlive": true,
"enableWebAccessibilityTesting": true,
"enableWebPerformanceTesting": true,
"webPerformanceSlaThreshold": 10,
"webDriverProfileName": "Web Driver Profile 1"
}
},
"enableSelfHealing": true,
"notifications": {
"notifyOnStart": true,
"notifyOnCompletion": true,
"notificationMode": "ON_ERROR",
"notificationEmails": [
"demo1@acmeInc.com",
"demo2@acmeInc.com"
],
"notificationChannels": {
"slackChannels": [
"Slack-channel-1"
],
"teamsChannels": [
"QA-Team",
"PKN-team"
]
}
},
"autoRerun": {
"failurePercentageLimit": 10,
"maxRerunAttempts": 5,
"delayBetweenReruns": 3,
"rerunOnNoImprovement": false
},
"setup": {
"testCaseSetup": {
"actionPid": 14,
"actionInputParams": [
{
"name": "configPath",
"valueType": "LITERAL",
"value": "/configs/settings.json"
},
{
"name": "maxRetries",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 2"
}
]
},
"testJobSetup": {
"actionPid": 19,
"actionInputParams": [
{
"name": "retryCount",
"value": "3"
}
]
}
},
"teardown": {
"testCaseTeardown": {
"actionPid": 13,
"actionInputParams": [
{
"name": "filePath",
"valueType": "LITERAL",
"value": "/users/data.csv"
},
{
"name": "transactionLimit",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 1"
}
]
},
"testJobTeardown": {
"actionPid": 18,
"actionInputParams": [
{
"name": "userAge",
"value": "21"
}
]
}
}
}'